<!-- 文章编辑 -->
<template>
	<view class="articleEdit">
		<view class="articleEdit_head">
			<view class="articleEdit_head_txt">简介</view>
			<view class="articleEdit_head_ipt">
				<textarea placeholder="请简单描述一下~(30字以内)" placeholder-style="color:#999999" maxlength="30" v-model="mymessage"></textarea>
			</view>
		</view>
		<view class="articleEdit_btn flex align_center flex_center" @click="updateCustomerIntro">保存</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				mymessage:'',
			};
		},
		methods:{
			updateCustomerIntro(){
				this.$http.get(this.$api.updateCustomerIntro + '?intro=' + this.mymessage ).then(res => {
					if(res.code == 200){
						uni.showToast({
							title: '编辑成功',
							duration: 2000
						});
						uni.navigateBack({
							delta: 1
						});
					}
				})
			},
		}
	}
</script>

<style lang="scss">
.articleEdit {
	.articleEdit_head {
		padding: 30rpx;
		margin-bottom: 40rpx;
		background: #FFFFFF;
		.articleEdit_head_txt {
			font-size: 30rpx;
		}
		.articleEdit_head_ipt {
			width: 100%;
			height: 160rpx;
			textarea {
				width: 100%;
				box-sizing: border-box;
				display: block;
				height: 100%;
				font-size: 30rpx;
			}
		}
	}
	.articleEdit_btn {
		color: #FFFFFF;
		font-size: 30rpx;
		width: 560rpx;
		height: 80rpx;
		background: #FFAF3C;
		border-radius: 40rpx;
		margin: 0 auto;
	}
}
</style>
